package com.driver.enums;

import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @description 是否枚举类
 */
public enum Whether implements IEnum<Integer> {

    YES(1, "是"),
    NO(0, "否");

    @JsonValue
    private final Integer code;

    private final String message;

    Whether(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public Integer getValue() {
        return code;
    }
}
